from numpy import *
import logisticRegression

X, y = logisticRegression.loadDataSet('testSet.txt', 2)
print shape(X), shape((y))
print type(array(X)), type(y)

theta = logisticRegression.batch_gradient_descent(X, y)
print theta, type(theta), shape(theta), theta.T

theta0 = logisticRegression.stochastic_gradient_descent0(X, y)
print theta0

theta1 = logisticRegression.stochastic_gradient_descent1(X, y)
print theta1

theta2 = logisticRegression.mini_batch_gradient_descent(X, y, 40, 0.01)
print theta2
# logisticRegression.plotBestFit(theta.getA())  # .getA()
# logisticRegression.plotBestFit(theta0.getA())
# logisticRegression.plotBestFit(theta1.getA())
logisticRegression.plotBestFit(theta2.getA())

logisticRegression.multiTest(3)
